<?
if(@$file_checklist)
{
	$d['bc'] = $file_checklist->birthcertificate;
	$d['pp'] = $file_checklist->passport;
	$d['ir'] = $file_checklist->immunizationrecord;
	$d['mc'] = $file_checklist->medicalcertificate;
	$d['id2'] =$file_checklist->idpicture2x2;
	$d['id1'] = $file_checklist->idpicture1x1;
	$d['eent'] =$file_checklist->eentcertificate;
	$d['ee'] = $file_checklist->entranceexam;
	$d['f137a'] =$file_checklist->form137a;
	$d['rf'] = $file_checklist->reccomendationform;
	$d['isp'] = $file_checklist->int_specialpermit;
	$d['iacr'] = $file_checklist->int_acr;
	$d['ibid'] = $file_checklist->int_bidcertificate;
	$d['iicr'] = $file_checklist->int_icr;
	$d['ipv'] = $file_checklist->int_parentvisa;
	$d['visa'] = $file_checklist->visa;
	$d['with_waiver'] = $file_checklist->with_waiver;
	$form_name = 'update_checklist';

}else{
	$d['bc'] = '0';
	$d['pp'] = '0';
	$d['ir'] = '0';
	$d['mc'] = '0';
	$d['id2'] = '0';
	$d['id1'] = '0';
	$d['eent'] = '0';
	$d['ee'] = '0';
	$d['f137a'] = '0';
	$d['rf'] = '0';
	$d['isp'] = '0';
	$d['iacr'] = '0';
	$d['ibid'] = '0';
	$d['iicr'] = '0';
	$d['ipv'] = '0';
	$d['visa'] = '0';
	$d['with_waiver'] = '0';
	$form_name = 'insert_checklist';
}
?>

<div>
	<div class="panel callout"><h6>Checklist</h6></div>
		<form action="<?=site_url('profile/student/'.$student->enrollment_id);?>" method="POST">
		<table style="width:100%;">
			<tbody>
				<thead>
				<tr>
					<td>Name Of File</td>
					<td align="center">Status</td>
				</tr>
				</thead>
				<tr>
					<td>Report Card (F-138) or authentic copy of latest academic records</td>
					<td>
						<?if($d['f137a'] == '0'):?>
							<input type="checkbox" name="form137a" value="1">
						<?else:?>
							<input type="checkbox" name="form137a" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Recommendation Letter</td>
					<td>
						<?if($d['rf'] == '0'):?>
							<input type="checkbox" name="reccomendationform" value="1">
						<?else:?>
							<input type="checkbox" name="reccomendationform" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Copy of Birth Certificate</td>
					<td>
						<?if($d['bc'] == '0'):?>
							<input type="checkbox" name="birthcertificate" value="1">
						<?else:?>
							<input type="checkbox" name="birthcertificate" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Medical Certificate</td>
					<td>
						<?if($d['mc'] == '0'):?>
							<input type="checkbox" name="medicalcertificate" value="1">
						<?else:?>
							<input type="checkbox" name="medicalcertificate" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>3 copies of 2x2 ID Picture</td>
					<td>
						<?if($d['id2'] == '0'):?>
							<input type="checkbox" name="idpicture2x2" value="1">
						<?else:?>
							<input type="checkbox" name="idpicture2x2" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<!--
				<tr>
					<td>3 copies of 1x1 ID Picture</td>
					<td>
						<?php //if($d['id1'] == '0'): ?>
							<input type="checkbox" name="idpicture1x1" value="1">
						<?php //else: ?>
							<input type="checkbox" name="idpicture1x1" value="1" checked>
						<?php //endif; ?>
					</td>
				</tr>
				-->
				<thead>
					<tr>
						<td colspan="2" class="center">FOREIGN APPLICANTS</td>
					</tr>
				</thead>
				<tr>
					<td>Copy of Passport</td>
					<td>
						<?if($d['pp'] == '0'):?>
							<input type="checkbox" name="passport" value="1">
						<?else:?>
							<input type="checkbox" name="passport" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Copy of Visa</td>
					<td>
						<?if($d['visa'] == '0'):?>
							<input type="checkbox" name="visa" value="1">
						<?else:?>
							<input type="checkbox" name="visa" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Copy of ACR-icard</td>
					<td>
						<?if($d['iicr'] == '0'):?>
							<input type="checkbox" name="int_icr" value="1">
						<?else:?>
							<input type="checkbox" name="int_icr" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Special Study Permit</td>
					<td>
						<?if($d['isp'] == '0'):?>
							<input type="checkbox" name="int_specialpermit" value="1">
						<?else:?>
							<input type="checkbox" name="int_specialpermit" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<!--
				<tr>
					<td>With Waiver</td>
					<td>
						<?if($d['with_waiver'] == '0'):?>
							<input type="checkbox" name="with_waiver" value="1">
						<?else:?>
							<input type="checkbox" name="with_waiver" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				-->
				<!--
				<tr>
					<td>Immunization Record</td>
					<td>
						<?if($d['ir'] == '0'):?>
							<input type="checkbox" name="immunizationrecord" value="1">
						<?else:?>
							<input type="checkbox" name="immunizationrecord" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				
				
				<tr>
					<td>EENT Certificate</td>
					<td>
						<?if($d['eent'] == '0'):?>
							<input type="checkbox" name="eentcertificate" value="1">
						<?else:?>
							<input type="checkbox" name="eentcertificate" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Entrance Exam</td>
					<td>
						<?if($d['ee'] == '0'):?>
							<input type="checkbox" name="entranceexam" value="1">
						<?else:?>
							<input type="checkbox" name="entranceexam" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				
				
				
				<tr>
					<td>Special Permit</td>
					<td>
						<?if($d['isp'] == '0'):?>
							<input type="checkbox" name="int_specialpermit" value="1">
						<?else:?>
							<input type="checkbox" name="int_specialpermit" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>Alein Certificate of Registration (ACR)</td>
					<td>
						<?if($d['iacr'] == '0'):?>
							<input type="checkbox" name="int_acr" value="1">
						<?else:?>
							<input type="checkbox" name="int_acr" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				<tr>
					<td>BID Certification Certificate</td>
					<td>
						<?if($d['ibid'] == '0'):?>
							<input type="checkbox" name="int_bidcertificate" value="1">
						<?else:?>
							<input type="checkbox" name="int_bidcertificate" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				
				<tr>
					<td>Parent's Visa</td>
					<td>
						<?if($d['ipv'] == '0'):?>
							<input type="checkbox" name="int_parentvisa" value="1">
						<?else:?>
							<input type="checkbox" name="int_parentvisa" value="1" checked>
						<?endif;?>
					</td>
				</tr>
				-->
			</tbody>
		</table>
	<?if($this->session->userdata('userType') == 'registrar'):?>
		<input type="hidden" name="form_id" value="<?=$form_name;?>">
		<input type="hidden" name="api_loc" value="<?=$token;?>">
		<input type="hidden" name="eid" value="<?=$student->enrollment_id;?>">
		<input type="submit" name="checklist_form" value="save" class="btn btn-success">
	<?endif;?>
	</form>
</div>